//logs.js
var util = require('../../utils/util.js')
Page({
  data: {
    logs: []
  },
  onLoad: function () {
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(function (log) {
        return util.formatTime(new Date(log))
      })
    })
  },
  test: function(){
       wx.request({  
          url: 'http://localhost:8080/YMGW/superMarketAction/skipPrefecture',  
          method: 'POST',
          dataType:'json',  
          header: {'content-type': 'application/x-www-form-urlencoded'},  
          success:function(res) {  
              console.log(res.data.name); 
          },  
          fail:function(res){  
              console.log('submit fail');  
          },  
          complete:function(res){  
              console.log('submit complete');  
          }  
  
      })  
  }
})
